package com.faneui.transfer.gateway.config;
//package cn.useonline.captain.gateway.config;
//
//import java.util.List;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.converter.HttpMessageConverter;
//import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//
//import com.fasterxml.jackson.databind.DeserializationFeature;
//import com.fasterxml.jackson.databind.ObjectMapper;
//
//@Configuration
//public class WebConfig extends WebMvcConfigurationSupport {
//	
//	@Bean
//	 public MappingJackson2HttpMessageConverter customJackson2HttpMessageConverter() {
//	  MappingJackson2HttpMessageConverter jsonConverter = new MappingJackson2HttpMessageConverter();
//	  ObjectMapper objectMapper = new ObjectMapper();
//	  objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//	  jsonConverter.setObjectMapper(objectMapper);
//	  return jsonConverter;
//	 }
//
//	@Override
//	public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
////		org.springframework.http.converter.StringHttpMessageConverter customerStringConverter = new org.springframework.http.converter.StringHttpMessageConverter(
////				Charset.forName("UTF-8"));
////		customerStringConverter.getSupportedMediaTypes().add(MediaType.APPLICATION_JSON_UTF8);
////		customerStringConverter.getSupportedMediaTypes().add(MediaType.TEXT_PLAIN);
////
////		HttpMessageConverter<Object> fastJsonHttpMessageConverter = new com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter();
////		fastJsonHttpMessageConverter.getSupportedMediaTypes().add(MediaType.APPLICATION_JSON_UTF8);
////		fastJsonHttpMessageConverter.getSupportedMediaTypes().add(MediaType.TEXT_PLAIN);
////		HttpMessageConverter<Object> mappingJacksonHttpMessageConverter = new org.springframework.http.converter.json.MappingJackson2HttpMessageConverter();
////		mappingJacksonHttpMessageConverter.getSupportedMediaTypes().add(MediaType.APPLICATION_JSON_UTF8);
////		mappingJacksonHttpMessageConverter.getSupportedMediaTypes().add(MediaType.TEXT_PLAIN);
////		ExingcaiHttpMessageConverter exincaiConverter = new ExingcaiHttpMessageConverter(fastJsonHttpMessageConverter,
////				mappingJacksonHttpMessageConverter);
////		converters.add(customerStringConverter);
////		converters.add(exincaiConverter);
//		converters.clear();
//		converters.add(customJackson2HttpMessageConverter());
//		super.addDefaultHttpMessageConverters(converters);
//	}
//}